﻿using Pb;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DDZUser : MonoBehaviour {
    EginDDZ ddz = EginDDZ.Instance;
    EginUser user = EginUser.Instance;
    public UISprite character;
    public UILabel username;
    public UILabel Coin;
    public UISprite SayScore;
    public UISprite ReadyStatus;
    public GameObject AutoStatus;

    public SEX sex;
    public int seatID;
    public GameObject LordStatus;

    //聊天
    public GameObject textObj;
    public UILabel text;
    public UISprite face;
    /// <summary>
    /// 显示人物形象
    /// </summary>
    /// <param name="LordSid"></param>
    public void ShowCharacter(int LordSid) {
        if (LordSid != 0)//地主
        {
            if (sex == SEX.Male)
            {
                character.spriteName = "dizhu";
            }
            else {
                character.spriteName = "dizhupo";
            }
            LordStatus.SetActive(true);
        }
        else {//普通人
            Debug.Log(sex);
            if (sex == SEX.Male)
            {
                
                character.spriteName = "nan";
            }
            else
            {
                character.spriteName = "nv";
            }
        }
        character.width = character.GetAtlasSprite().width;
        character.height = character.GetAtlasSprite().height;
    }

}
